<template>
	<view>
		<!--  手机顶部高度 -->
		<view class="navbar" :style="{height: systemBarHeight + 'px'}">
		</view>
		<view class="navbar">
			<uni-nav-bar @clickLeft="fh" :border="false" left-icon="left" title="关注列表" />
		</view>

		<view class="add">

			<view class="add_item" v-for="(item,index) in addList" :key="index">
				<view class="add_item_lf">
					<image src="/static/logo.png" mode=""></image>
				</view>
				<view class="add_item_rg">
					<view class="add_item_rg_ion">
						<text>{{item.username}}</text>
					</view>
					<view class="add_item_rg_meg">
						<text>{{item.meg}}</text>
					</view>
				</view>
				<view class="add_item_bt" v-if="add==false" @click="addchange()">
					<image src="/static/mine/gz.png" mode=""></image>
					<text>关注</text>
				</view>
				<view class="add_item_bt1" v-if="add==true">
					<text>已关注</text>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemBarHeight: 0,
				add: false,
				addList: [{
					username: '小暖知识谈',
					meg: '用心出发，做好自己，文案文案文案文案文案+wx12345678',

				},
				{
					username: '小暖知识谈',
					meg: '用心出发，做好自己，文案文案文',
				
				},
				{
					username: '小暖知识谈',
					meg: '用心出发，做好自己，文案文案文',
				
				},
				{
					username: '小暖知识谈',
					meg: '用心出发，做好自己，文案文案文',
				
				}]
			}
		},
		mounted() {
			this.getSysteminfo()
		},
		methods: {
			/* 手机顶部高度 */
			getSysteminfo() {
				uni.getSystemInfo({
					success: res => {
						this.systemBarHeight = res.statusBarHeight;
					}
				});
			},
			addchange(){
				this.add=!this.add
			}
		},
		
	}
</script>

<style lang="scss" scoped>
	.add {
		.add_item {
			width: 91%;
			margin: 30rpx auto 0;
			padding-bottom: 30rpx;
			border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
			display: flex;
			align-items: center;
			.add_item_lf {
				>image {
					width: 69rpx;
					height: 69rpx;
					border-radius: 34.5rpx;
				}
			}
			.add_item_rg {
				margin-left: 15rpx;
width: 70%;
				.add_item_rg_ion {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 31rpx;
					color: #152034;
				}

				.add_item_rg_meg {
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					font-size: 27rpx;
					color: #45516B;
					margin-top: 10rpx;
				}
			}
			.add_item_bt {
				width: 153rpx;
				height: 69rpx;
				margin-left: auto;
				background: #1677FF;
				border-radius: 42rpx 42rpx 42rpx 42rpx;
				display: flex;
				align-items: center;
				justify-content: center;

				>image {
					width: 34.35rpx;
					height: 34.35rpx;

				}

				>text {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 27rpx;
					color: #FFFFFF;

				}
			}

			.add_item_bt1 {
				width: 153rpx;
				height: 69rpx;
				background: #FFFFFF;
				border-radius: 42rpx 42rpx 42rpx 42rpx;
				border: 1rpx solid #7D8CA4;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 27rpx;
				color: #7D8CA4;
				display: flex;
				margin-left: auto;
				align-items: center;
				justify-content: center;
			}
		}
	}
</style>